package com.kaiyidiannao.model.bean;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by 大志 on 14-4-4.
 *   天天惠-商品
 */
public class DaydayCouponBean implements Serializable {

    //天天惠列表数据
    private String orderid;//订单号
    private String itemid; //商品编号
    private String thumb; //缩略图
    private String title; //商品名称
    private String price; //价格
    private String sales; //成交量

    //json结构类数据
    private String code; //返回数据表示，0表示正常，1表示错误
    private String msg; //错误提示信息

    private String catid; //当前分类编号
    private String page; //当前页码
    private String order;//排序方式

    private String top; //置顶
    private String hits; //点击量

    //商品详细页面
    private String v1,v2,v3,n1,n2,n3;
    private  String m1,m2,m3; //规格
    private String content; //简介
    private String introduce; //简介

    //购物车页面
    private String amount; //库存
    private String count; //数量
    private String key;//购物车参数数，如（1-1-1-1）
    private String isCheck = "true"; //该产品是否选中
    private String payment; //可选商品的支付方式

    private String[] picture; //商户图片1~8 thumb、thumb1、…、thumb7

    private String fid;
    private boolean is_fav; //是否收藏
    private boolean is_praise; //是否点赞
    private String fare;


    public String getPayment() {
        return payment;
    }

    public void setPayment(String payment) {
        this.payment = payment;
    }

    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public boolean isIs_praise() {
        return is_praise;
    }

    public void setIs_praise(boolean is_praise) {
        this.is_praise = is_praise;
    }

    public String getFare() {
        return fare;
    }

    public void setFare(String fare) {
        this.fare = fare;
    }

    public boolean isIs_fav() {
        return is_fav;
    }

    public void setIs_fav(boolean is_fav) {
        this.is_fav = is_fav;
    }

    public Object[] getSpecsData() {
        ArrayList<String> datas = new ArrayList<String>();
        try {
            if (!getM1().equals("")) {
                datas.add(getM1());
            }
            if (!getM2().equals("")) {
                datas.add(getM2());
            }
            if (!getM3().equals("")) {
                datas.add(getM3());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return datas.toArray();
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public String getN1() {
        return n1;
    }

    public void setN1(String n1) {
        this.n1 = n1;
    }

    public String getN2() {
        return n2;
    }

    public void setN2(String n2) {
        this.n2 = n2;
    }

    public String getN3() {
        return n3;
    }

    public void setN3(String n3) {
        this.n3 = n3;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getFid() {
        return fid;
    }

    public void setFid(String fid) {
        this.fid = fid;
    }

    public String[] getPicture() {
        return picture;
    }
    public ArrayList<String> getPicture2() {
        ArrayList<String> arrayList = new ArrayList<String>();
        for (int i = 0 ; picture != null && i < picture.length; ++i) {
            arrayList.add(picture[i]);
        }
        return arrayList;
    }
    public void setPicture(String[] picture) {
        this.picture = picture;
    }

    public String getThumb() {
        return thumb;
    }

    public void setThumb(String thumb) {
        this.thumb = thumb;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getSales() {
        return sales;
    }

    public void setSales(String sales) {
        this.sales = sales;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCatid() {
        return catid;
    }

    public void setCatid(String catid) {
        this.catid = catid;
    }

    public String getPage() {
        return page;
    }

    public void setPage(String page) {
        this.page = page;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public String getTop() {
        return top;
    }

    public void setTop(String top) {
        this.top = top;
    }

    public String getHits() {
        return hits;
    }

    public void setHits(String hits) {
        this.hits = hits;
    }

    public String getV1() {
        return v1;
    }

    public void setV1(String v1) {
        this.v1 = v1;
    }

    public String getV2() {
        return v2;
    }

    public void setV2(String v2) {
        this.v2 = v2;
    }

    public String getV3() {
        return v3;
    }

    public void setV3(String v3) {
        this.v3 = v3;
    }

    public String getM1() {
        return m1;
    }

    public void setM1(String m1) {
        this.m1 = m1;
    }

    public String getM2() {
        return m2;
    }

    public void setM2(String m2) {
        this.m2 = m2;
    }

    public String getM3() {
        return m3;
    }

    public void setM3(String m3) {
        this.m3 = m3;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public String getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(String isCheck) {
        this.isCheck = isCheck;
    }

    public String getItemid() {
        return itemid;
    }

    public void setItemid(String itemid) {
        this.itemid = itemid;
    }

    @Override
    public String toString() {
        return "DaydayCouponBean{" +
                "thumb='" + thumb + '\'' +
                ", title='" + title + '\'' +
                ", price='" + price + '\'' +
                ", sales='" + sales + '\'' +
                ", catid='" + catid + '\'' +
                '}';
    }
}